<?xml version="1.0" encoding="utf-8" ?>
<scripts>
	<script type="function" name="dbo.WeekBeginning" path="scripts\WeekBeginning.sql"/>
	<script type="function" name="dbo.WeekEnding" path="scripts\WeekEnding.sql"/>
	<script type="function" name="dbo.MakeDate" path="scripts\MakeDate.sql"/>
	<script type="table" name="dbo.NextIDValue" path="scripts\NextIDValue.sql">
		<basedata>
			<columns>
				<column name="ParameterName" type="string"/>
				<column name="NextIDValue" type="numeric"/>
			</columns>
			<rows>
				<row parametername="Database" nextidvalue="100"/>
				<row parametername="DBBlockLog" nextidvalue="100"/>
				<row parametername="DBConnectLog" nextidvalue="5000"/>
				<row parametername="DBWaitStateLog" nextidvalue="2000"/>
				<row parametername="Field" nextidvalue="200000"/>
				<row parametername="Function" nextidvalue="10"/>
				<row parametername="Index" nextidvalue="2000"/>
				<row parametername="Login" nextidvalue="200"/>
				<row parametername="ScanHistory" nextidvalue="2000"/>
				<row parametername="ScanQueue" nextidvalue="10"/>
				<row parametername="ScanSchedule" nextidvalue="50"/>
				<row parametername="Server" nextidvalue="20"/>
				<row parametername="SParam" nextidvalue="10000"/>
				<row parametername="SProc" nextidvalue="500"/>
				<row parametername="Table" nextidvalue="5000"/>
				<row parametername="TableSize" nextidvalue="1500000"/>
				<row parametername="TSSession" nextidvalue="200000"/>
				<row parametername="VField" nextidvalue="500"/>
				<row parametername="View" nextidvalue="50"/>
			</rows>
		</basedata>
	</script>
	<script type="table" name="dbo.tDDServers" path="scripts\tDDServers.sql"/>
	<script type="table" name="dbo.tDDDatabases" path="scripts\tDDDatabases.sql"/>
	<script type="table" name="dbo.tDDLogins" path="scripts\tDDLogins.sql"/>
	<script type="table" name="dbo.tDDTables" path="scripts\tDDTables.sql"/>
	
	<script type="table" name="dbo.tDDFields" path="scripts\tDDFields.sql"/>
	<script type="index" name="dbo.tDDFields" path="scripts\tDDFields_indexes.sql"/>
	
	<script type="table" name="dbo.tDDFunctions" path="scripts\tDDFunctions.sql"/>
	<script type="table" name="dbo.tDDFunctionText" path="scripts\tDDFunctionText.sql"/>
	<script type="table" name="dbo.tDDIndexes" path="scripts\tDDIndexes.sql"/>
	<script type="table" name="dbo.tDDSProcs" path="scripts\tDDSProcs.sql"/>
	
	<script type="table" name="dbo.tDDParams" path="scripts\tDDParams.sql"/>
	<script type="index" name="dbo.tDDParams" path="scripts\tDDParams_indexes.sql"/>
	
	<script type="table" name="dbo.tDDSProcText" path="scripts\tDDSProcText.sql"/>
	<script type="table" name="dbo.tDDVFields" path="scripts\tDDVFields.sql"/>
	<script type="table" name="dbo.tDDViews" path="scripts\tDDViews.sql"/>
	<script type="table" name="dbo.tDDViewText" path="scripts\tDDViewText.sql"/>
	<script type="table" name="dbo.ScanType" path="scripts\ScanType.sql">
		<basedata>
			<columns>
				<column name="id"/>
				<column name="name"/>
				<column name="createname"/>
			</columns>
			<rows>
				<row id="1" name="SchemaScan" createname="system"/>
				<row id="2" name="SizeScan" createname="system"/>
				<row id="3" name="BlockScan" createname="system"/>
				<row id="4" name="ConnectionScan" createname="system"/>
				<row id="5" name="WaitStateScan" createname="system"/>
			</rows>
		</basedata>
	</script>
	<script type="table" name="dbo.ScanScheduleDefaults" path="scripts\ScanScheduleDefaults.sql">
		<basedata>
			<columns>
				<column name="id"/>
				<column name="scantypeid"/>
				<column name="scantypeintervalminutes"/>
				<column name="createname"/>
			</columns>
			<rows>
				<row id="1" scantypeid="1" scantypeintervalminutes="1440" createname="system"/>
				<row id="2" scantypeid="2" scantypeintervalminutes="1440" createname="system"/>
				<row id="3" scantypeid="3" scantypeintervalminutes="10" createname="system"/>
				<row id="4" scantypeid="4" scantypeintervalminutes="10" createname="system"/>
				<row id="5" scantypeid="5" scantypeintervalminutes="10" createname="system"/>
			</rows>
		</basedata>
	</script>
	
	<script type="table" name="dbo.ScanHistory" path="scripts\ScanHistory.sql"/>
	<script type="index" name="dbo.ScanHistory" path="scripts\ScanHistory_indexes.sql"/>
	
	<script type="table" name="dbo.ScanQueue" path="scripts\ScanQueue.sql"/>
	<script type="index" name="dbo.ScanQueue" path="scripts\ScanQueue_indexes.sql"/>
	
	<script type="table" name="dbo.ScanSchedule" path="scripts\ScanSchedule.sql"/>
	<script type="table" name="dbo.Session" path="scripts\Session.sql"/>
	<script type="table" name="dbo.TableSizeHistory" path="scripts\TableSizeHistory.sql"/>
	<script type="table" name="dbo.BlockingHistory" path="scripts\BlockingHistory.sql"/>
	
	<script type="table" name="dbo.ReportSchedule" path="scripts\ReportSchedule.sql"/>
	<script type="index" name="dbo.ReportSchedule" path="scripts\ReportSchedule_indexes.sql"/>
	
	<script type="table" name="dbo.Configuration" path="scripts\Configuration.sql">
		<basedata>
			<columns>
				<column name="id"/>
				<column name="name"/>
				<column name="value"/>
			</columns>
			<rows>
				<row id="1" name="MAIL_SMTP" value=""/>
				<row id="2" name="MAIL_USR" value=""/>
				<row id="3" name="MAIL_PWD" value=""/>
				<row id="4" name="SIZE_RETENTION_PERIOD" value="185"/>
				<row id="5" name="BLOCKING_RETENTION_PERIOD" value="185"/>
				<row id="8" name="MAIL_SENDER" value=""/>
				<row id="9" name="WAITSTATE_SCAN_DURATION" value="5"/>
				<row id="10" name="SERVICE_INTERVAL" value="30000"/>
				<row id="11" name="SCHEMA_SCAN_TIMEOUT_PERIOD" value="1440"/>
				<row id="12" name="CONNECTION_SCAN_TIMEOUT_PERIOD" value="1440"/>
				<row id="13" name="BLOCK_SCAN_TIMEOUT_PERIOD" value="1440"/>
				<row id="14" name="WAITSTATE_SCAN_TIMEOUT_PERIOD" value="1440"/>
				<row id="15" name="SIZE_SCAN_TIMEOUT_PERIOD" value="1440"/>
				<row id="16" name="MAIL_RECIPIENT" value=""/>
				<row id="17" name="ROOT_URL" value=""/>
				<row id="18" name="WAITSTATE_RETENTION_PERIOD" value="185"/>
				<row id="19" name="CONNECTION_RETENTION_PERIOD" value="185"/>
			</rows>
		</basedata>
	</script>
	
	<script type="table" name="dbo.ConnectHistory" path="scripts\ConnectHistory.sql"/>
	<script type="index" name="dbo.ConnectHistory" path="scripts\ConnectHistory_indexes.sql"/>
	
	<script type="table" name="dbo.ConnectSummary" path="scripts\ConnectSummary.sql"/>
	<script type="table" name="dbo.WaitStates" path="scripts\WaitStates.sql">
		<basedata>
			<columns>
				<column name="name"/>
				<column name="desc"/>
			</columns>
			<rows>
				<row name="ASYNC_DISKPOOL_LOCK" desc="RARE During Backup and Restore (e.g. including zeroing out pages) threads written in parallel."/>
				<row name="ASYNC_IO_COMPLETION" desc="Waiting for asynchronous IO requests to complete."/>
				<row name="CMEMTHREAD" desc="Waiting for thread safe memory objects"/>
				<row name="CURSOR" desc="Aynch cursor thread"/>
				<row name="CXPACKET" desc="Parallel process waits. Possible skew of data possible lock of a range for this cpu meaning one parallel process is behind, etc."/>
				<row name="DBTABLE" desc="New Checkpoint request that is waiting for outstanding checkpoint request to complete"/>
				<row name="DTC" desc="Waiting for Distributed Transaction Coordinator"/>
				<row name="EC" desc="Non-parallel synchronization between parent and child thread"/>
				<row name="EXCHANGE" desc="Waiting on a parallel process to complete, shutdown or startup."/>
				<row name="EXECSYNC" desc="Query memory and spooling to disk"/>
				<row name="IO_COMPLETION" desc="Waiting for IO requests to complete.  "/>
				<row name="LATCH_x" desc="Latches are short term light weight synchronization objects.  Latches are not held for the duration of a transaction. "/>
				<row name="LATCH_DT" desc="Destroy Latch"/>
				<row name="LATCH_EX" desc="Exclusive Latch"/>
				<row name="LATCH_KP" desc="Keep Latch"/>
				<row name="LATCH_NL" desc="Null Latch"/>
				<row name="LATCH_SH" desc="Shared Latch"/>
				<row name="LATCH_UP" desc="Update Latch"/>
				<row name="LCK_x" desc="Possible transaction management issue.  "/>
				<row name="LCK_M_BU" desc="Bulk update lock"/>
				<row name="LCK_M_IS" desc="Intent Share lock"/>
				<row name="LCK_M_IU" desc="Intent Update lock"/>
				<row name="LCK_M_IX" desc="Intent Exclusive lock"/>
				<row name="LCK_M_RIn_NL" desc="Range Intent Null Lock"/>
				<row name="LCK_M_RIn_S" desc="Range Intent Shared lock"/>
				<row name="LCK_M_RIn_U" desc="Range Intent Update lock"/>
				<row name="LCK_M_RIn_X" desc="Range Intent Exclusive lock"/>
				<row name="LCK_M_RS_S" desc="Range Shared Shared (Key-Range) lock"/>
				<row name="LCK_M_RS_U" desc="Range Shared Update (key-range) lock"/>
				<row name="LCK_M_RX_S" desc="Range Exclusive shared (key-range) "/>
				<row name="LCK_M_RX_U" desc="Range Exclusive update (key-range) lock"/>
				<row name="LCK_M_RX_X" desc="Range Exclusive Exclusive (key-range) "/>
				<row name="LCK_M_S" desc="Shared Lock: "/>
				<row name="LCK_M_SCH_M" desc="Modify schema lock: "/>
				<row name="LCK_M_SCH_S" desc="Shared Schema (Stability) lock"/>
				<row name="LCK_M_SIU" desc="Share Intent Update lock"/>
				<row name="LCK_M_SIX" desc="Share Intent Exclusive lock"/>
				<row name="LCK_M_U" desc="Update lock."/>
				<row name="LCK_M_UIX" desc="Update intent exclusive lock"/>
				<row name="LCK_M_X" desc="Exclusive lock"/>
				<row name="LOGMGR" desc="Waiting for write requests to the transaction log to complete.  "/>
				<row name="MISCELLANEOUS" desc="Catch all wait type"/>
				<row name="NETWORKIO" desc="Waiting on Network IO Completion.  Waiting to read or write to a client on the network"/>
				<row name="OLEDB" desc="OLEDB waits. Common causes are:
•	SQL Server is waiting for client application to send data.  Some examples include: 
•	1. BULK INSERT
•	2. CONVERT (6.5 to 2000)
•	3. Full text
•	4. Linked server calls incl. four part name calls, remote procedure calls, openquery, openrowset etc.
•	5. Queries that access virtual tables, since these are implemented as OLEDB rowset providers.
"/>
				<row name="PAGEIOLATCH_x" desc="Latches are short term synchronization objects.  used to synchronize access to buffer pages.  PageIOLatch is used for disk to memory transfers."/>
				<row name="PAGEIOLATCH_DT" desc="IO Page destroy latch"/>
				<row name="PAGEIOLATCH_EX" desc="IO Page latch exclusive"/>
				<row name="PAGEIOLATCH_KP" desc="IO Page latch keep"/>
				<row name="PAGEIOLATCH_NL" desc="IO Page latch null"/>
				<row name="PAGEIOLATCH_SH" desc="IO Page latch shared"/>
				<row name="PAGEIOLATCH_UP" desc="IO Page latch update"/>
				<row name="PAGELATCH_x" desc="Latches are short term light weight synchronization objects.  Latches are not held for the duration of a transaction. Typical latching operations during row transfers to memory, controlling modifications to row offset table, etc.  Consequently, the duration of latches is normally sensitive to available memory."/>
				<row name="PAGELATCH_DT" desc="Page latch"/>
				<row name="PAGELATCH_EX" desc="Page latch exclusive"/>
				<row name="PAGELATCH_KP" desc="Page latch keep"/>
				<row name="PAGELATCH_NL" desc="Page latch null"/>
				<row name="PAGELATCH_SH" desc="Page latch shared"/>
				<row name="PAGELATCH_UP" desc="Page latch Update "/>
				<row name="PAGESUPP" desc="Waits for parallel page supplier.  Possible disk bottleneck"/>
				<row name="PIPELINE_INDEX_STAT" desc="PIPELINE waittypes added to allow one user to perform multiple operations such as writes to log cache on behalf of himself as well as other users who are waiting for same operation.  It does all log writes in single operation."/>
				<row name="PIPELINE_LOG" desc="user to perform multiple operations such as writes to log cache on behalf of himself as well as other users who are waiting for same operation.  Does in single operation."/>
				<row name="PIPELINE_VLM" desc="PIPELINE waittypes added to allow one user to perform multiple operations such as writes to log cache on behalf of himself as well as other users who are waiting for same operation.  Does in single operation."/>
				<row name="PSS_CHILD" desc="Waiting on Asynch thread"/>
				<row name="RESOURCE_QUEUE" desc="Internal Use only"/>
				<row name="RESOURCE_SEMAPHORE" desc="COMMON for DSS like workload &amp; large queries such as hash joins; must wait for memory quota (grant) prior to execution."/>
				<row name="SHUTDOWN" desc="Shutdown without specifying NOWAIT, waits for other users to logout before shutdown completes"/>
				<row name="SLEEP" desc="Internal Use only"/>
				<row name="TEMPOBJ" desc="Dropping a global temp object that is being used by others."/>
				<row name="TRAN_MARK_DT" desc="Transaction latch - destroy"/>
				<row name="TRAN_MARK_EX" desc="Transaction latch - Exclusive"/>
				<row name="TRAN_MARK_KP" desc="Transaction latch - Keep page"/>
				<row name="TRAN_MARK_NL" desc="Transaction latch - Null"/>
				<row name="TRAN_MARK_SH" desc="Transaction latch - Shared"/>
				<row name="TRAN_MARK_UP" desc="Transaction latch - Update "/>
				<row name="UMS_THREAD" desc="Batch waiting on a worker thread to free up (or batch waiting to get a worker thread to run it)"/>
				<row name="WAITFOR" desc="Check for waitfor delay in TSQL code"/>
				<row name="WRITELOG" desc="Waiting for write requests to the transaction log to complete.  "/>
				<row name="XACTLOCKINFO" desc="Transaction escalation, rollback"/>
			</rows>
		</basedata>
	</script>
	
	<script type="table" name="dbo.WaitStateHistory" path="scripts\WaitStateHistory.sql"/>
	<script type="index" name="dbo.WaitStateHistory" path="scripts\WaitStateHistory_indexes.sql"/>
	
	<script type="sproc" name="dbo.p_GetNextIDValue" path="scripts\p_GetNextIDValue.sql"/>
	<script type="sproc" name="dbo.p_TableAverageSizesForWeek" path="scripts\p_TableAverageSizesForWeek.sql"/>
	<script type="sproc" name="dbo.p_ScanForBlocks" path="scripts\p_ScanForBlocks.sql"/>
	<script type="sproc" name="dbo.p_ResetDatabase" path="scripts\p_ResetDatabase.sql"/>
	<script type="sproc" name="dbo.p_AverageWeeklyTableSize" path="scripts\p_AverageWeeklyTableSize.sql"/>
	<script type="sproc" name="dbo.p_TableSize10PointTrends" path="scripts\p_TableSize10PointTrends.sql"/>
	<script type="sproc" name="dbo.p_AverageWeeklyDatabaseSize" path="scripts\p_AverageWeeklyDatabaseSize.sql"/>
	<script type="sproc" name="dbo.p_WaitState10PointTrends" path="scripts\p_WaitState10PointTrends.sql"/>
	<script type="sproc" name="dbo.p_AverageDailyConnectionCount" path="scripts\p_AverageDailyConnectionCount.sql"/>
	<script type="sproc" name="dbo.p_AverageDayConnectionCount" path="scripts\p_AverageDayConnectionCount.sql"/>
	<script type="sproc" name="dbo.p_AverageDailyBlockCount" path="scripts\p_AverageDailyBlockCount.sql"/>
	<script type="sproc" name="dbo.p_AverageDayBlockCount" path="scripts\p_AverageDayBlockCount.sql"/>
	<script type="sproc" name="dbo.p_AverageDayWaitStates" path="scripts\p_AverageDayWaitStates.sql"/>
	<script type="sproc" name="dbo.p_ScanStatus" path="scripts\p_ScanStatus.sql"/>
	<script type="sproc" name="dbo.p_DeleteExpiredScanHistoryData" path="scripts\p_DeleteExpiredScanHistoryData.sql"/>
	<script type="view" name="dbo.vWaitStateHistory" path="scripts\vWaitStateHistory.sql"/>
	<script type="sproc" name="dbo.p_ConnectionStillAlive" path="scripts\p_ConnectionStillAlive.sql"/>
	<script type="sproc" name="dbo.p_AverageWeeklyBlockCount" path="scripts\p_AverageWeeklyBlockCount.sql"/>
</scripts>